package com.guoxin.chapter2.t16;

/**
 * @author guoxin
 * @date 2019年8月21日
 */
public class RunThread implements Runnable{
	private volatile boolean isRunning = true;
	
	public boolean isRunning() {
		return isRunning;
	}

	public void setRunning(boolean isRunning) {
		this.isRunning = isRunning;
	}

	@Override
	public void run() {
		System.out.println("进入run了");
		while(isRunning){
			
		}
		System.out.println("线程被停止");
	}

}
